package com.qd.panda.card.third;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.cdqidi.util.page.PageUtil;
import com.qd.common.panda.domain.entity.card.third.sync.ThirdPartyListDTO;
import com.qd.panda.service.card.third.sync.ThirdPartyListService;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 优惠券/第三方/WEB_第三方劵列表
 *
 * @author sjk
 */
@RequiredArgsConstructor
@Validated
@RestController
@RequestMapping("/sys/thirdPartyList/")
@Slf4j
public class ThirdPartyListController {
    private final ThirdPartyListService thirdPartyListService;

    /**
     * 列表
     *
     * @param dto 查询参数以及页数和每页显示条数
     * @return 列表信息
     */
    @GetMapping(value = "/page")
    public IPage<ThirdPartyListDTO> page(ThirdPartyListDTO dto) {
        return thirdPartyListService.page(PageUtil.buildPage(dto), dto);
    }
}